<?php
header("Content-type: text/html; charset=utf-8");
include_once("RedisKillModel.class.php");
$obj=new RedisKillModel();
//给redis初始化
//给redis初始化
$obj->connectRedis("127.0.0.1","6379");  //设置redis
$obj->setCounts("counts");   //设置库存字段
$obj->setGoodsId("goodsId");//设置商品表主键
$obj->setOderModel("order"); //设置订单表
$obj->setGoodsTable("goods");//设置商品表
$obj->setGoodsObj("Goods");//设置商品操作模型类类名
$obj->setOrderObj("Order");//设置订单操作模型类类名
$obj->manageRedisCount(1)  ;  //发起请购
//
//
//
//$obj->connectRedis("127.0.0.1","6379");  //设置redis
//$obj->setCounts("counts");   //设置库存字段
//$obj->setGoodsId("goodsId");//设置商品表主键
//$obj->setOderModel("order"); //设置订单表
//$obj->setGoodsTable("goods");//设置商品表
//$obj->setGoodsObj("Goods");//设置商品操作模型类类名
//$obj->setOrderObj("Order");//设置订单操作模型类类名
//$userId=rand(1,1000);

//var_dump($obj->RunPurchase(1,$userId)) ;

